<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="stopgame">||你好</div>
  <!-- button对象调用自己绑定的函数 -->
  <button onclick="Atest()">点击</button>
  <script>
    window.onload = function () {
      
    var btn =  document.querySelector('button')  
    btn.Atest= function test() {
        console.log(11111);
      }
     console.dir(btn);
    }
  
    
  </script>
</body>

</html>